<!doctype html>
<!--
	SVN Info: $Id: index.html 50 2012-11-10 04:31:47Z gengkev@gmail.com $
-->
<html lang="en" ng-csp>
<head>
	<title>A Grade Sheet</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
	<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' https: localhost:5000"/>
	<meta http-equiv="X-Content-Security-Policy" content="default-src 'self' 'unsafe-inline' https: localhost:5000"/>
	<meta http-equiv="X-WebKit-CSP" content="default-src 'self' 'unsafe-inline' https: localhost:5000"/>
	<meta name="author" content="Kevin Geng"/>
	<meta name="description" content="An online grade sheet editing and viewing application"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.min.css"/>
	<link rel="stylesheet" type="text/css" href="css/index.css"/>
	<script src="js/index.js"></script>
	<!--[if lt IE 9]>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6/html5shiv.min.js"></script>
	<![endif]-->
</head>
<body ng-controller="MainCtrl">
	<div class="navbar">
		<div class="navbar-inner">			
			<a class="brand" href="#/">
				<span id="a">A</span>
				<span class="hidden-phone">Grade Sheet</span>
			</a>
			<ul class="nav">
				<li ng-class="{active: onPage('')}"><a href="#/">
					<i class="icon-home visible-phone"></i>
					<span class="hidden-phone">Home</span>
				</a></li>
			</ul>
			<ul class="nav pull-right">
				<li ng-class="{active: onPage('settings')}"><a href="#/settings">
					<i class="icon-wrench visible-phone"></i>
					<span class="hidden-phone">Settings</span>
				</a></li>
				<li><a href="" ng-click="refresh()" id="refresh" title="Refresh" ng-bind="refreshing && '...' || '\u27f2'">&#x27f2;</a></li>
			</ul>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<!-- Navigation -->
			<div class="span3">
				<ul class="nav nav-list well">
					<li class="nav-header">Courses</li>
					
					
					<!-- list gradesheets -->
					<li ng-repeat="course in courses" ng-class="{active: $index == active}">
						<a href="#/view/{{course.id}}" title="{{course.description}}" ng-bind="course.name || 'Untitled'"></a>
						<ul class="nav nav-list">
							<li ng-repeat="sheet in course.sheets">
								<a href="#/view/{{course.id}}/{{sheet.id}}" title="{{sheet.description}}" ng-bind="sheet.name || 'Untitled'"></a>
							</li>
						</ul>
					</li>
					
					<li class="divider"></li>
					
					<!-- show only when logged in -->
					<li ng-show="logged_in" class="btn-group btn-group-vertical full-width">
						<button class="btn btn-success full-width" ng-click="newCourse()">+ New Course</button>
						<button class="btn btn-warning full-width" ng-click="navigate('/import')">Import Grade Sheet</a>
					</li>
					
					<!-- show only when logged out -->
					<li ng-hide="logged_in" class="full-width">
						<button class="btn btn-primary full-width" ng-click="authorize()">Authorize Google Drive</button>
					</li>
				</ul>
			</div>
			
			<!-- Body -->
			<div class="span9" ng-view></div>
		</div>
	</div>
	<div id="overlay" ng-show="overlay">
		<h1>Loading</h1>
		<p>Patience, young grasshopper!</p>
		<progress></progress>
	</div>
</body>
</html>